package com.cdd.index.controller;

import com.cdd.index.service.IArticleService;
import com.common.entity.Article;
import com.common.untils.CommonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author lzl
 * @since 2022-09-08
 */
@RestController
@RequestMapping("/index/article")
public class ArticleController {
    @Autowired
    private IArticleService articleService;
    @PostMapping("/selectAll/{navId}")
    public CommonResult selectAll(@PathVariable String navId){
        return articleService.selectAll(navId);
    }

    @PostMapping("/updateArticle")
    public CommonResult updateArticle(@RequestBody Article article){
        return articleService.updateArticle(article);
    }

}